//
//  ApiGuoKaiHepler.h
//  GKZY_CLASS
//
//  Created by KwokChun Cheung on 15/12/1.
//  Copyright © 2015年 eenet. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
#import "BasicReq.h"

static NSString *GKZYContentType = @"text/html";
static NSString *GKZYJsonContentType = @"application/json";

static NSString *API_KEY_LOGIN = @"Login";
static NSString *API_KEY_STUDENT_SHOW = @"StudentShow";
static NSString *API_KEY_SIGNUP_UPDATE = @"SignupUpdate";
static NSString *API_KEY_GKZY_COURSE_LIST = @"GKZYCourseList";
static NSString *API_KEY_GKZY_COURSE_CAT = @"GKZYCourseCat";
static NSString *API_KEY_GKZY_STUDY_SITUATION = @"GKZYStudySituation";

@interface ApiGuoKaiHepler : NSObject

@property (nonatomic, strong) AFHTTPRequestOperation *operation;
@property (nonatomic, assign) BOOL isTest;

-(BOOL)archiveIsTest;

-(NSMutableDictionary *)toPOST:(NSString *)keyPath
                        andReq:(BasicReq *)req
                andContentType:(NSString *)contentType
                       andSync:(BOOL)isSync
                    andSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))successBack
                    andFailure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failureBack;

-(NSMutableDictionary *)toPOST:(NSString *)keyPath
                 andParameters:(NSDictionary *)parameters
                andContentType:(NSString *)contentType
                       andSync:(BOOL)isSync
                    andSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))successBack
                    andFailure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failureBack;
@end
